﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShoppingEntity
{
	/// <summary>
	/// 订单表实体类
	/// </summary>
	public class OrderInfo:BaseDeleteEntity
	{
		/// <summary>
		/// 商品ID
		/// </summary>
		[Column(TypeName = "varchar(36)")]
		public string GoodsId { get; set; }
		/// <summary>
		/// 用户ID
		/// </summary>
		[Column(TypeName = "varchar(36)")]
		public string UserId { get; set; }
		/// <summary>
		/// 订单金额
		/// </summary>
		[Column(TypeName = "decimal")]
		public decimal Amount { get; set; }
		/// <summary>
		/// 订单状态
		/// </summary>
		public OrderStateEnum State { get; set; }
		/// <summary>
		/// 购物数量
		/// </summary>
		public int Num { get; set; }
		/// <summary>
		/// 下单时间
		/// </summary>
		public DateTime OrderTime { get; set; }

		/// <summary>
		/// 订单结束时间
		/// </summary>
		public DateTime? EndTime { get; set; }

		public enum OrderStateEnum
		{		 
			已下单= 0, 
			已发货 = 1,
			配送中 = 2,
			已送达 = 3,
			订单已完成 = 4,
			退货申请=5,
			同意退货=6, 
			货物待揽收=7,
			货物运输中 = 8,
			已退回仓库=9,
			退款完成 = 10,
		}


	}
}
